require("/usr/local/apache/locmag.net/include/func.php");
//リファラーチェック
CMP_ADD();
function GET_IMAGE_AND_URL($id){
global $con;
$query = "select logo_path,url from enterprize_info where enterprize_id = $id and logo != ''";
$res = pg_exec($con,$query);
$num = pg_numrows($res);
if($num != "" && $num > 0){
$buf[0] = 1;
$buf[1] = pg_result($res,0,0);
$buf[2] = pg_result($res,0,1);
}else{
$buf[0] = -1;
}
return $buf;
}
if($id == ""){
$id = 1;
}
if(check_num($id) == -1){
print "Error;";
}
$con = DB_con();
$query = "select enterprize_id,locmag_code,url from enterprize_info where enterprize_id = $id and active = 1";
$res = pg_exec($con,$query);
if(!$res){
print "Error:";
exit();
}else{
$num = pg_numrows($res);
if($num == 0 || $num == ""){
print "Error;";
exit();
}else{
$enterprize_id = sprintf("%08d",pg_result($res,0,0));
$buf = pg_result($res,0,1);
$locmag_code = sprintf("%d",substr($buf,2,2)).",".sprintf("%d",substr($buf,4,2)).",".sprintf("%d",substr($buf,6,2)).",".sprintf("%d",substr($buf,8,2));
$arr = GET_IMAGE_AND_URL($id);
if($arr[0] == 1){
$image = $arr[1];
$url = $arr[2];
$link = "";
}
$query = "update enterprize_info set count = count + 1 where enterprize_id = $id";
pg_exec($con,$query);
//Update 2002-07-03
//企業別LOCMAGダウンロード数表示の為、ダウンロード数をログとして残す
$query = "insert into locmag_log values($id,1,0,'now')";
pg_exec($con,$query);
DB_CLZ($con);
}
}
if($enterprize_id == ""){
exit();
}
?>
Locmag
|
|
|
|
Copyright(C) 2002 NAP Digital Communications,inc.All
Rights Reserved.
*このサービスは現在特許出願中です。
|
|